package com.xxl.job.admin.controller;

import com.xxl.job.kettle.core.entity.KRepository;
import com.xxl.job.kettle.core.service.KRepositoryService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * 实现功能：
 *
 * @author 作者[zk]
 * @version 1.0.00  2022-12-03 15:24
 */
@Controller
@RequestMapping("/jobFileDir")
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class JobFileDirController {

    private final KRepositoryService kRepositoryService;
    @RequestMapping
    public String index(Model model) {
        List<KRepository> repList = kRepositoryService.findRepList();
        model.addAttribute("repList", repList);
        return "jobFileDir/jobFileDir.index";
    }
}
